/*
** Copyright (C) 2010 Calin Radoni
**
** This file is part of CHScanner.
**
** CHScanner is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** CHScanner is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with CHScanner. If not, see <http://www.gnu.org/licenses/>.
*/

#include "StdAfx.h"
#include "MWmiInfo.h"

//---------------------------------------------------------------------------

MWmiInfo::MWmiInfo(void)
{
	propertyCount = 0;
	next = NULL;
}

MWmiInfo::~MWmiInfo(void)
{
}

//---------------------------------------------------------------------------

MWmiInfo* MWmiInfo::CreateChild(void)
{
	return NULL;
}
void MWmiInfo::DeleteChild(void)
{
}

//---------------------------------------------------------------------------
void MWmiInfo::AddChild(MWmiInfo* elemIn)
{
	MWmiInfo *elem;

	elem = this;
	while(elem->next!=NULL)
		elem = elem->next;
	elem->next = elemIn;
}

//---------------------------------------------------------------------------

int MWmiInfo::GetPropertyCount(void)
{
	return propertyCount;
}

//---------------------------------------------------------------------------

void MWmiInfo::Initialize(void)
{
}
CString MWmiInfo::GetQueryString(void)
{
	return _T("");
}
CString MWmiInfo::GetPropertyName(int)
{
	return _T("");
}
bool MWmiInfo::SetPropertyValue(int, VARIANT*)
{
	return false;
}

//---------------------------------------------------------------------------

bool MWmiInfo::SetFromPointer(MWmiInfo*)
{
	return false;
}

//---------------------------------------------------------------------------

int MWmiInfo::GetSizeM_OS(CString strIn)
{
	unsigned __int64 val64;
	int retVal;

	val64 = _tcstoui64(strIn, NULL, 10);
	if(val64==_UI64_MAX) return 0;

	retVal = (int)(val64>>10);

	return retVal;
}

int MWmiInfo::GetSizeM(CString strIn)
{
	unsigned __int64 val64;
	int retVal;

	val64 = _tcstoui64(strIn, NULL, 10);
	if(val64==_UI64_MAX) return 0;

	retVal = (int)(val64>>20);

	return retVal;
}

int MWmiInfo::GetSizeG(CString strIn)
{
	unsigned __int64 val64;
	int retVal;

	val64 = _tcstoui64(strIn, NULL, 10);
	if(val64==_UI64_MAX) return 0;

	retVal = (int)(val64>>30);

	return retVal;
}

//---------------------------------------------------------------------------

bool MWmiInfo::IsEmpty(void)
{
	return true;
}

//---------------------------------------------------------------------------
